import { http } from "@/utils";
// Compare this snippet from vite.config.ts:
type ResType<T> = {
  code: number;
  message: string;
  data: T;
};

type ListResType = {
  id: number;
  name: string;
};

type ListParams = {
  channels: ListResType[];
};

// 请求评率
export function fetchList() {
  return http<ResType<ListParams>>({
    method: "GET",
    url: "/api/list",
  });
}
